#ifndef HISTORIQUE_H
#define HISTORIQUE_H

#include <QVector>
#include <QString>
#include <QFile>
#include <QTextStream>

class Historique
{
        QVector<QString> pile;
        int i;
public:
    Historique();//const QFile&);
    void add(const QString&);
    void save()const;
    void clear();
    QString current()const{if(i==pile.size())return "";return pile[i];}
    bool previous(){if(i>0){i--;return true;}return false;}
    bool next(){if(i<pile.size()){i++;return true;}return false;}
    QString operator[](int i){return pile[i];}
    int size(){return pile.size();}
};

#endif // HISTORIQUE_H
